#ifndef eraser_tool_H
#define eraser_tool_H

#include "tool.h"

class Page;
class QPainterPath;
class QGraphicsPathItem;

/**
 * The tool used for free hand drawing on a page.
 */
class Eraser : public Tool
{
    Q_OBJECT

public:
    /**
     * Create a new eraser.
     * @param parent The parent object of this pen.
     */
    Eraser(QObject *parent=0);

private:
    /**
     * A reference to the page where the erasing was started.
     * Used as an indicator, if the pen is "pressed" down.
     */
    bool m_erasing;

public slots:
    /**
     * Start erasing.
     */
    void mousePressEvent(QMouseEvent *event, Document *document);

    /**
     * Erase everything in your path.
     */
    void mouseMoveEvent(QMouseEvent *event, Document *document);

    /**
     * And stop erasing.
     */
    void mouseReleaseEvent(QMouseEvent *event, Document *document);
};

#endif
